package com.youth.orderservice.Client;


import com.youth.ClientEntity.OrderCourse;
import com.youth.orderservice.Client.Impl.CourseClientFallback;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(name = "service-edu",fallback = CourseClientFallback.class)
public interface CourseClient {

    @ApiOperation(value = "根据课程id去查询订单里面的课程信息，用于远程调用")
    @GetMapping("/eduservice/course/orderCourse/{courseId}")
    public OrderCourse orderCourse(@PathVariable(value = "courseId") String courseId);


    @ApiOperation(value = "向课程成员表里面添加信息,用于远程调用")
    @GetMapping("/eduservice/coursemember/insertCourseMember/{courseId}/{memberId}")
    public boolean insertCourseMember(@PathVariable(value = "courseId") String courseId,
                                      @PathVariable(value = "memberId") String memberId);




}
